package com.esender.common.exception;

import com.esender.common.enums.ExceptionEnums;
import lombok.Getter;

@Getter
public class SearchException extends RuntimeException{
    private Integer code;

    /**
     * message使用父类得message
     * @param message
     * @param code
     */
    public SearchException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public SearchException(ExceptionEnums enums){
        super(enums.getMsg());
        this.code = enums.getCode();
    }
}
